package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.Equipment;
import org.apache.ibatis.annotations.Param;


import java.util.List;

/**
 * 	类说明:设备资料mapper接口
 *
 * @author XIET
 *
 * @version 创建时间：2018年12月3日 上午10:37:09
 */

public interface EquipmentMapper{

	/**
	 * 	查询全部设备资料
	 * @param equipment
	 * @return
	 */
	List<Equipment> listEquipment(Equipment equipment);

	/**
	 *	 查询单个设备资料
	 * @param lEquipmentId
	 * @return
	 */
	List<Equipment> getEquipment(@Param("lEquipmentId") Integer lEquipmentId);

	/**
	 * 	批量删除设备资料
	 * @param lEquipmentIds
	 * @param lDataState
	 * @return
	 */
	int deleteEquipment(@Param("lEquipmentIds") Long[] lEquipmentIds, @Param("lDataState") Integer lDataState);

	/**
	 * 	查询分页总数
	 * @param equipment
	 * @return
	 */
	int countEquipment(Equipment equipment);

	/**
	 * 查询工位
	 * @param lProductionLineId
	 * @return
	 */
	List<Integer> listLStation(Integer lProductionLineId);

	/**
	 * 根据编码查重
	 * @param lEquipmentId
	 * @param vcEquipmentCode
	 * @return
	 */
	public Equipment getByEquipmentCode(Equipment equipment);
	/**
	 * 重写父类的新增方法
	 */
	int insertSelective(Equipment equipment);
	/**
	 * 重写父类的更新方法
	 */
	int updateByPrimaryKeySelective(Equipment equipment);

	//根据名称去查找设备
	int selectByVcEquipmentName(Equipment equipment);


}
